<%@page import="com.hf.buildtb.entity.BiCooperator"%>
<%@page import="com.hf.buildtb.formodel.BiCooperatorForm"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%> 
  <script>
 function removetr(item) {
	 
	 $(this).alertmsg('confirm', '您确认要删除该条记录吗！',{
		 okCall:function(){ $(item).parent().parent().remove();}
	 })
	
	}
 function removerbtn(item) {
	 
	 
	   	$(item).next("a").remove();
	  
	}  
</script>
 <div class="bjui-pageHeader" id="faser">
  <form id="pagerForm" data-toggle="ajaxsearch" action="buildtb/bicooperator/biCooperatorAction!list.action" method="post" data-clearQuery="false" data-loadingmask="true">
        <div class="bjui-searchBar">
            <label> 名称：</label><input type="text" value="${entity.name}" name="entity.name" size="10" id="seacrchStr">&nbsp;
            <input type="checkbox" name="entity.isValid" id="entity.isValid" data-toggle="icheck" value="${entity.isValid}" data-label="过滤停用：" checked  >
             <button id="btns" type="submit" class="btn-default" data-icon="search"  >查询</button>&nbsp;
            <a class="btn btn-orange" href="javascript:;"  data-icon="undo"  data-toggle="reloadsearch" data-clear-query="true">清空查询</a>&nbsp;
            <div class="alert alert-info search-inline"><i class="fa fa-info-circle"></i> 双击行可编辑</div>&nbsp;
            <div class="pull-right">
                <button type="button" class="btn-green" data-toggle="tableditkeyadd" data-target="#tabledite" data-num="1" data-icon="plus">新增</button>&nbsp;
            </div>            
        </div>
     </form>
</div> 
<div class="bjui-pageContent tableContent">
    <form action="fams/faunit/" id="j_custom_form" class="pageForm" data-toggle="validate" method="post">
        <table id="tabledite" class="table table-bordered table-hover table-striped table-top" data-toggle="tableditkey" data-initnum="0" data-action="buildtb/bicooperator/biCooperatorAction!add.action"
         data-single-noindex="true"    >
            <thead>
                <tr data-idname="">
                    <th title="代码"><input type="text"  readonly="readonly" name="entity.id" data-rule="required;dm"  data-rule-dm="[/^\d{4}$/,'请输入四位数有效数字']" value="" data-key='true' 
                  data-conmsg='代码重复。请重新输入！'    data-url='buildtb/bicooperator/biCooperatorAction!findEntityBykey.action'
                     ></th> 
                    <th title="名称"><input type="text" name="entity.name" data-rule="required" value=""  ></th>
		             
                   <th title="有效"> <select name="entity.isValid" data-toggle="selectpickerkey" data-rule="required"><option value="true">是</option><option value="false">否</option></select></th>
                   <th title="备注"><input type="text" name="entity.memo"  value=""  ></th>
 
		            <th title="" data-addtool="true" width="100">
		                
		                <button type="button" class="btn-green" data-toggle="donew">保存</button>  
		              <button type="button" class="btn-green" data-toggle="docancle">取消</button> 
		            </th>
                </tr>
            </thead>
            <tbody>
   				<c:forEach var="list" items="${model.entities}" varStatus="status">
                <tr data-id="${status.index+1}">
                   
                    <td data-val="${list.id}"></td>
                    <td  data-val="${list.name}"></td>
                    <td data-val="${list.isValid?true:false}"></td>
                    <td data-val="${list.memo}"></td>
                    <td data-noedit="true">
                        <button type="button" class="btn-green" data-toggle="doedit">编辑</button>  
                        <button type="button" class="btn-green" data-toggle="docancle">取消</button> 
                                             </td>

                </tr>
                </c:forEach>
            </tbody>
        </table>
    </form>
</div>
<div class="bjui-pageFooter">

</div>